﻿<!--#include file="const.asp"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>


<%
if sid="Null" then
	Response.Redirect "login.asp"
	Response.end
end if
%>
	<card title="编辑连接地址"><p align="left">
<%
	dim rs,sql,page,i,paged
    		Page = Request("page")      '当前页数
    		If Page = "" Then Page = 1
   		If Not IsNumeric(Page) Then Page = 1
    		Page = CLng(Page)
    		If Page < 1 Then Page = 1
    		Paged = Request("paged")      '当前页数
    		If Paged = "" Then Paged = 1
   		If Not IsNumeric(Paged) Then Paged = 1
    		Paged = CLng(Paged)
    		If Paged < 1 Then Paged = 1
	dim id,classid
    		classid = Request("classid")
    		If classid = "" Then classid = 0
   		If Not IsNumeric(classid) Then classid = 0
    		classid = CLng(classid)
    		If classid < 0 Then classid = 0
    		id = Request("id")    
    		If id = "" Then id = 1
   		If Not IsNumeric(id) Then id = 1
    		id = CLng(id)
    		If id < 1 Then id = 1
if Request("act")=1 then
                dim aid
    		aid = Request("aid")    
    		If aid = "" Then aid = 1
   		If Not IsNumeric(aid) Then aid = 1
    		aid = CLng(aid)
    		If aid < 1 Then aid = 1
		set rs=Server.CreateObject("ADODB.Recordset")
		Sql = "select top 1 *  FROM qingtian_phoneurl where id="&aid&""
		rs.open sql,conn,1,3
		if not (rs.eof and rs.bof) then
		rs.Delete
		end if
		rs.Close
		Set rs = Nothing
end if
%>
编辑连接地址.
<br/>----------------<br/>
<%



	Set Rs = Server.CreateObject("Adodb.Recordset")
        Sql = "SELECT * from qingtian_phoneurl where aid="&id&" order by id desc"
		Rs.Open Sql,conn,1,1
		if not (rs.bof and rs.eof)  then
				Rs.PageSize = 10	'一页N条记录
				IF Not IsEmpty(Paged) Then
					IF Not IsNumeric(Paged) Then		'判断Page是否为数字
						Paged=1
					Else
						Paged=Cint(Paged)		'转换成短整形Integer
					End IF
					IF Paged > Rs.PageCount Then
						Rs.AbsolutePage = Rs.PageCount	'设置当前显示页等于最后一页
					ElseIF Paged <= 0 Then
						Rs.AbsolutePage = 1		'设置当前页等于第一页
					Else
						Rs.AbsolutePage = Paged	'如果大于零,显示当前页等于接收的页数
					End IF
				Else
					Rs.AbsolutePage = 1
				End IF
				Paged = Rs.AbsolutePage


		For i=1 to  Rs.PageSize
		If Rs.Eof Then
			exit For
		End If
			%><%=i+(page-1)*Rs.PageSize%>地址:<%=qingtian.utf8(rs("Fileurl"))%><br/>[<a href="editphoneurl.asp?classid=<%=classid%>&amp;page=<%=page%>&amp;id=<%=id%>&amp;aid=<%=rs("id")%>&amp;sid=<%=sid%>">修改</a>|<a href="editfilelist2.asp?act=1&amp;classid=<%=classid%>&amp;page=<%=page%>&amp;id=<%=id%>&amp;aid=<%=rs("id")%>&amp;sid=<%=sid%>">删除</a>]<br/><%
	 	Rs.MoveNext
	  	Next

       
    		'分页
    		If Page < rs.PageCount Then
    		    Response.Write("<a href='editfilelist2.asp?classid="&classid&"&amp;page="&page&"&amp;id="&id&"&amp;paged="&paged+1&"&amp;sid="&sid&"'>下一页</a>")
    		End If
       
    		If Page > 1 And Page < rs.PageCount Then
    		    Response.Write("|")
    		End If
        
    		If Page > 1 Then
    		    Response.Write("<a href='editfilelist2.asp?classid="&classid&"&amp;page="&page&"&amp;id="&id&"&amp;paged="&paged-1&"&amp;sid="&sid&"'>上一页</a><br/>")
    		Elseif rs.PageCount >1 then
    		    Response.Write("<br/>")
    		End If
                else
     		    Response.Write("暂无连接地址,请选择添加.<br/>")
		end if
		Rs.close

			
	set rs=nothing
%>
<a href='editfilelist1.asp?classid=<%=classid%>&amp;page=<%=page%>&amp;id=<%=id%>&amp;sid=<%=sid%>'>返回编辑软件内容</a>
<br/>----------------<br/>		
<a href='filelist.asp?classid=<%=classid%>&amp;page=<%=page%>&amp;sid=<%=sid%>'>返回下载管理</a><br/>
<a href='index.asp?sid=<%=sid%>'>后台管理首页</a><br/>
<%
end Function
%>
